Using collective intelligence to solve public problems